{extend name="../front" /}
{block name="head"}
<title>用户中心－{:config('site.title')}</title>
{/block}
{block name="main"}
<main class="container">
  {include file='navbar' /}
  <div class="input-group mb-3">
    <span class="input-group-text">每邀请一个好友奖励<strong class="mx-1 text-primary">{:config('score.reward')}</strong>积分</span>
    <input class="form-control" type="text" id="inviteUrl" value="{:url('user/signup/index',['pid'=>$user_id],false,true)}" placeholder="推广链接">
    <button class="btn btn-secondary" type="button" id="btn-copy" data-clipboard-action="copy" data-clipboard-target="#inviteUrl">复制</button>
  </div>
  <div class="card">
    <div class="card-body">
      <div class="card-title mb-3">
        <strong class="fs-6">积分充值</strong>
        <span class="text-muted mx-1">积分充值比例为1:{:config('score.recharge')}，1元人民币可兑换（{:config('score.recharge')}）积分</span>
      </div>
      <div class="row row-cols-5 g-4">
        {foreach [1,5,10,20,50,100,200,500,1000,2000] as $key=>$value}
        <div class="col d-grid">
          <a class="btn btn-secondary btn-block py-3" href="{:dcUrl('user/recharge/index',['price'=>$value])}" data-toggle="recharge">
            <h4>{$value}元</h4>
            <p class="small mb-0">兑换（{:config('score.recharge')*$value}）积分</p>
          </a>
        </div>
        {/foreach}
      </div>
    </div>
  </div>
</main>
{/block}